<?php

	require_once ( LIB_DIR.'classes/Pager.php' );
	$p=intval($_GET[UP_RESULT_PAGE]);
	$p = $p == 0 ? 1 : $p;
	
	$type=intval($_GET['type']);
	$type = $type == 0 ? 0 : 1;
	
	$couponDAO=GetGiftCouponDAO();
	
	$totalNum=0;
	$coupons=$couponDAO->GetCouponList($totalNum, $type, $p, COUPON_PER_PAGE);
	
	$hotgift=$couponDAO->GetHotGifts(7);
	$recenthistories=$couponDAO->GetRecentHistory(10);
	
	
	$pageObj = new Pager( edp_href_link(PAGENAME_COUPON_SUMMARY, 'type='.$type), $totalNum, COUPON_PER_PAGE, $p, UP_RESULT_PAGE );
	return true;

?>